public class TestInitOrder {
	
	public static class Foo {
		static { a = 2; }
		public static int a = 1;
	}

	public static class Bar {
		public static int a = 1;
		static { a = 2; }
	}
	public static class SubBar extends Bar {
		public static int b = a;
	}

	public static void main(String[] args) {
		System.out.println(Foo.a);
		System.out.println(Bar.a);
		System.out.println(SubBar.a);

		/**
 		 * output, <clinit> 的顺序与 代码的顺序有关
 		 * 1
 		 * 2 
 		 * 2
		 */
	}
}